class CreateEntries < ActiveRecord::Migration
  def self.up
    create_table :entries do |t|
      t.column :user_id, :integer, :null => false
      t.column :subject, :string, :null => false
      t.column :body, :text
      t.column :spot_id, :integer, :null => false
      t.column :visible, :integer, :null => false
      t.column :picture_url, :string, :null => true
      t.column :entry_at, :datetime, :null => true
      t.column :weather, :string
      t.column :feeling, :string
      t.column :counter, :integer
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
  end

  def self.down
    drop_table :entries
  end
end
